#include <stdio.h>
int main()
{
	int x = 0, y = 0, xi = 0, yi = 0;
	int a = 0, n = 0;
	scanf("%d %d %d %d", &x, &y, &a, &n);
	
	int cnt = 0;
	for ( int i = 0; i < n; i++ ) {
		scanf("%d %d", &xi, &yi);
		long long d = (long long)a * a;
		d -= (long long)(xi - x)*(xi - x);
		d -= (long long)(yi - y)*(yi - y);
		if ( d >= 0 ) {
			cnt ++;
		}
	}
	printf("%d", cnt);
	return 0;
} 
